package br.ufrj.dcc.so;

import java.util.ArrayList;
import java.util.List;


public class Main {
	public static void main(String[] args) {

		final int NUMTHREADS = 3;
		
		MemoriaVirtual mv = new MemoriaVirtual();
		
		List<Runnable> threads = new ArrayList<Runnable>();
		
		for(int i = 0; i<NUMTHREADS; i++){
			Runnable r = new Programa(mv);
			threads.add(r);
			try {
				new Thread(r).start();
				//Espera 5 segundos para criar outra thread
				Thread.sleep(5000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}
}
